home *** CD-ROM | disk | FTP | other *** search
/ CD Loisirs 26 / CDL26.iso / PICASSO / DATA / THEMES.DXR / 00036_Script Maitre.ls < prev    next >
Encoding:
Text File  |  1996-12-09  |  2.6 KB  |  99 lines

  1. on startMovie
  2.   global g_xlib_xpal, g_palettecast, g_visite, g_index, g_tempo, g_call_param, nomtheme, numecran, nbecran, ltheme
  3.   set ltheme to [["F", 9], ["A", 12], ["D", 9], ["H", 20], ["C", 15], ["E", 8], ["G", 12], ["B", 11]]
  4.   set g_visite to 0
  5.   set g_index to 0
  6.   set g_palettecast to 39
  7.   if listp(g_call_param) then
  8.     set g_visite to 1
  9.     set nomtheme to getAt(g_call_param, 1)
  10.     set numecran to value(getAt(g_call_param, 2))
  11.     repeat with i = 1 to 8
  12.       if nomtheme = getAt(getAt(ltheme, i), 1) then
  13.         set nbecran to getAt(getAt(ltheme, i), 2)
  14.         exit repeat
  15.       end if
  16.     end repeat
  17.     set g_tempo to getAt(g_call_param, 3)
  18.     go("theme")
  19.   else
  20.     if (g_call_param <> -1) and (voidp(g_call_param) = 0) then
  21.       set g_index to 1
  22.       set nomtheme to chars(g_call_param, 2, 2)
  23.       set numecran to value(chars(g_call_param, 3, length(g_call_param)))
  24.       repeat with i = 1 to 8
  25.         if nomtheme = getAt(getAt(ltheme, i), 1) then
  26.           set nbecran to getAt(getAt(ltheme, i), 2)
  27.           exit repeat
  28.         end if
  29.       end repeat
  30.       go("theme")
  31.     end if
  32.   end if
  33. end
  34.  
  35. on stopMovie
  36.   puppetSound(0)
  37. end
  38.  
  39. on loadfile num, name
  40.   global g_path_convert
  41.   put name
  42.   set the picture of cast num to the picture of cast the number of member name
  43. end
  44.  
  45. on convertpath name
  46.   global g_path_convert
  47.   set g_path_convert to EMPTY
  48.   repeat with i = 1 to length(name)
  49.     set c to chars(name, i, i)
  50.     if (c = ":") and (chars(name, i + 1, i + 1) <> "\") then
  51.       set g_path_convert to g_path_convert & "\"
  52.       next repeat
  53.     end if
  54.     set g_path_convert to g_path_convert & c
  55.   end repeat
  56. end
  57.  
  58. on loadpalette name
  59.   puppetPalette(the number of member name, 60, 1)
  60.   updateStage()
  61.   duplicate(cast the number of member name, 41)
  62.   puppetPalette(41, 60, 1)
  63.   updateStage()
  64.   puppetPalette(the number of member name, 60, 1)
  65. end
  66.  
  67. on unpuppet
  68.   repeat with i = 1 to 48
  69.     puppetSprite(i, 0)
  70.   end repeat
  71. end
  72.  
  73. on OwnPlay destination
  74.   global gOwnPlayList
  75.   if voidp(gOwnPlayList) then
  76.     set gOwnPlayList to []
  77.   end if
  78.   repeat with i = 1 to count(gOwnPlayList)
  79.     if getAt(getAt(gOwnPlayList, i), 1) = (the pathName & the movie) then
  80.       deleteAt(gOwnPlayList, i)
  81.     end if
  82.   end repeat
  83.   add(gOwnPlayList, [the pathName & the movie, the frame])
  84.   put "play ---> ", gOwnPlayList
  85.   go(1, destination)
  86. end
  87.  
  88. on OwnPlayDone
  89.   global gOwnPlayList
  90.   put "done ---> ", gOwnPlayList
  91.   set length to count(gOwnPlayList)
  92.   if length = 0 then
  93.     beep()
  94.     exit
  95.   end if
  96.   go(getAt(getAt(gOwnPlayList, length), 2), getAt(getAt(gOwnPlayList, length), 1))
  97.   deleteAt(gOwnPlayList, length)
  98. end
  99.